:root {
  --pagination-text-color: #555;
  --pagination-font-size: var(--font-size-md);
  --pagination-active-color: var(--color-on-primary);
  --pagination-active-bg-color: var(--color-primary);
  --pagination-hover-bg-color: rgba(85, 85, 85, 0.15);
  --pagination-total-margin: 0 12px;
  --pagination-total-line-height: 24px;
  --pagination-item-width: 32px;
  --pagination-item-height: 32px;
  --pagination-item-margin: 0 6px;
  --pagination-item-background: #fff;
  --pagination-item-border-radius: 4px;
  --pagination-item-simple-border-radius: 50%;
  --pagination-input-width: 32px;
  --pagination-disabled-color: var(--color-text-disabled);
  --pagination-bg-disabled-color: var(--color-disabled);
  --pagination-size-line-height: 24px;
  --pagination-size-padding: 0 6px;
}

// Mixins
.var-pagination-flex-nowrap {
  display: flex;
  white-space: nowrap;
  align-items: center;
}

.var-pagination {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  font-size: var(--pagination-font-size);
  padding: 0;
  color: var(--pagination-text-color);

  &__item {
    display: inline-flex;
    min-width: var(--pagination-item-width);
    align-items: center;
    justify-content: center;
    margin: var(--pagination-item-margin);
    height: var(--pagination-item-height);
    cursor: pointer;
    border-radius: var(--pagination-item-border-radius);
    outline: none;
    transition: all 0.25s;
    user-select: none;
    background-color: var(--pagination-item-background);

    &:hover {
      background-color: var(--pagination-hover-bg-color);
    }

    &--active {
      color: var(--pagination-active-color);
      background-color: var(--pagination-active-bg-color) !important;
    }

    &--hide {
      display: none;
    }

    &--simple {
      background: transparent;
      border-radius: var(--pagination-item-simple-border-radius);
    }

    &--disabled {
      cursor: not-allowed !important;
      color: var(--pagination-disabled-color);
      background-color: unset;

      &:hover {
        background-color: unset;
      }

      &--hover {
        &:hover {
          background-color: inherit;
        }
      }

      &--active {
        background-color: var(--pagination-bg-disabled-color);

        &:hover {
          background-color: var(--pagination-bg-disabled-color);
        }
      }
    }
  }

  &__prev {
    margin-left: 0;
  }

  &__total {
    .var-pagination-flex-nowrap();

    line-height: var(--pagination-total-line-height);
    margin: var(--pagination-total-margin);
  }

  &__size {
    .var-pagination-flex-nowrap();

    line-height: var(--pagination-size-line-height);
    margin: var(--pagination-item-margin);
    padding: var(--pagination-size-padding);
    cursor: pointer;

    &--open {
      display: flex;
      align-items: center;
      cursor: pointer;

      &--disabled {
        cursor: inherit;
      }
    }
  }

  &__quickly,
  &__simple {
    .var-pagination-flex-nowrap();

    [var-pagination-cover] {
      width: var(--pagination-input-width);
      .var-field-decorator__middle {
        padding: 0;
      }
      .var-input__input {
        height: auto;
        text-align: center;
      }
    }

    &-line {
      height: 1px;
      background: transparent;
    }
  }

  &__quickly {
    margin: var(--pagination-item-margin);

    [var-pagination-cover] {
      margin-left: 6px;
    }
  }

  &__size--open-icon[var-pagination-cover] {
    font-size: inherit;
  }
}
